package com.gamotech.schoollifedemo.channel.home

import android.content.Context
import io.flutter.plugin.common.BinaryMessenger
import io.flutter.plugin.common.MethodCall
import io.flutter.plugin.common.MethodChannel

class HomeChannel private constructor(context: Context) : MethodChannel.MethodCallHandler {
    private var homeChannel: MethodChannel? = null
    private var mContext: Context = context

    companion object {
        fun createHomeChannel(context: Context): HomeChannel {
            return HomeChannel(context)
        }
    }

    fun register(binaryMessenger: BinaryMessenger) {
        homeChannel = MethodChannel(binaryMessenger, HomeContract.name)
        homeChannel?.setMethodCallHandler(this)
    }

    object HomeContract {
        const val name = "com.homechannel"
    }


    override fun onMethodCall(call: MethodCall, result: MethodChannel.Result) {
        when (call.method) {

        }
    }
}